<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>layui</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="../lib/layui-v2.5.5/css/layui.css" media="all">
    <link rel="stylesheet" href="../css/public.css" media="all">
    <link rel="stylesheet" href="../css/balance.css" media="all">
</head>
<body>
<div class="layuimini-container">
    <div class="title">
        <em></em>
        <h3>余额明细</h3>
    </div>
    <div class="layuimini-main">
        <table class="layui-hide" id="currentTableId" lay-filter="currentTableFilter"></table>

    </div>
</div>
<script src="../lib/layui-v2.5.5/layui.js" charset="utf-8"></script>
<script>
    layui.use(['form', 'table','tfApi'], function () {
        var $ = layui.jquery,
            form = layui.form,
            table = layui.table,
            API = layui.tfApi;

        table.render({
            elem: '#currentTableId',
            url: API.CURL +  '/seller/qryAccounts',
            cellMinWidth: 80,
            method: "POST",
            contentType: 'application/json',
            xhrFields: {withCredentials: true},crossDomain: true,
            request:{
                pageName: "page",
                limitName : "pageSize"
            },
            where:{
                "page": "0",
                "pageSize": "50"
            },
            cols: [[
                {field: 'sellerName', title: '商户名称'},
                {field: 'serviceName',  title: '服务商名称'},
                {field: 'investTotal', title: '充值金额（元）',templet : function (d) {
                        var _s = d.investTotal || 0,
                            _sr = API.numFun(parseFloat(_s).toFixed(2));
                        return "<b>"+_sr+"</b>";
                    }},
                {field: 'serverAmount', title: '服务费扣除（元）',templet : function (d) {
                        var _s = d.serverAmount || 0,
                            _sr = API.numFun(parseFloat(_s).toFixed(2));
                        return "<b>"+_sr+"</b>";
                }},
                {field: 'systemAdd', title: '系统加款（元）',templet : function (d) {
                    var _s = d.systemAdd || 0,
                        _sr = API.numFun(parseFloat(_s).toFixed(2));
                    return "<b>"+_sr+"</b>";
            	}},
            	{field: 'systemDel', title: '系统扣款（元）',templet : function (d) {
                    var _s = d.systemDel || 0,
                        _sr = API.numFun(parseFloat(_s).toFixed(2));
                    return "<b>"+_sr+"</b>";
            	}},
                {field: 'sendAmount', title: '累计发放（元）',templet : function (d) {
                        var _s = d.sendAmount || 0,
                            _sr = API.numFun(parseFloat(_s).toFixed(2));
                        return "<b>"+_sr+"</b>";
                }},
                {field: 'accountTotal',  title: '账户总余额（元）',templet : function (d) {
                        var _s = d.accountTotal || 0,
                            _sr = API.numFun(parseFloat(_s).toFixed(2));
                        return "<b>"+_sr+"</b>";
                }},
            ]],
            //page: true,
            //skin: 'line'
        });

    });
</script>

</body>
</html>